package com.md.threadtest.saleticket;

/**
 * @Author Gong
 * @Description
 * @dATE 2022/3/29 14:25
 **/
public class TestBuyTicket {
    public static void main(String[] args) {
        SaleTicket st = new SaleTicket();//公共票池对象
        for (int i   = 0; i < 1000; i++) {
            Thread daili = new Thread(st);
            daili.setName("代理商"+i);
            daili.start();
        }
//        Thread daili = new Thread(st);
//        daili.setName("代理商"+i);
//        daili.start();
//
//        Thread taopaopao = new Thread(st);
//        taopaopao.setName("逃跑跑");
//        taopaopao.start();
//
//        Thread huanniu = new Thread(st);
//        huanniu.setName("黄牛");
//        huanniu.start();

    }
}
